<template>
  <input v-bind="$attrs" :type="type" :value='value' @input="inputHandle"/>
</template>

<script>
export default {
  inheritAttrs: false,
  name: 'GlInput',
  props: {
    value: {
      type: String
    },
    type: {
      type: String,
      default: 'text'
    }
  },
  data() {
    return {

    }
  },
  methods: {
    inputHandle(e) {
      this.$emit('input', e.target.value)
      this.$parent.validate()
    }
  },
  components: {

  }
}
</script>

<style>

</style>
